import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import first from '@/components/first'
import second from '@/components/second'
import third from '@/components/third'
import fourth from '@/components/fourth'
import five from '@/components/five'
import six from '@/components/six'
import seven from '@/components/seven'
import eight from '@/components/eight'
import nine from '@/components/nine'
import setpaynum from '@/components/setpaynum'
import resetpaynum from '@/components/resetpaynum'
import agreement from '@/components/agreement'
import temporaryLimit from '@/components/temporaryLimit'
import PromoteLimit from '@/components/PromoteLimit'
import CommonProblem from '@/components/CommonProblem'
import pay from '@/components/pay'
import jumpBankCard from '@/components/jumpBankCard'
import myCenter from '@/components/myCenter'
import MyBill from '@/components/MyBill'
import modificationAddress from '@/components/modificationAddress'



Vue.use(Router)

const router=new Router({
	// mode: "history",
  routes: [
    {
      path: '/',
      redirect:'/first',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/first',
      name: 'first',
      // meta:{auth:true},  // 设置当前路由需要校验
      component: first
    },
    {
      path: '/second',
      name: 'second',
      component: second
    },
    {
      path: '/third',
      name: 'third',
      component: third
    },
    {
      path: '/fourth',
      name: 'fourth',
      component: fourth
    },
    {
      path: '/five',
      name: 'five',
      component: five
    },
    {
      path: '/six',
      name: 'six',
      component: six
    },
    {
      path: '/seven',
      name: 'seven',
      component: seven
    },
    {
      path: '/eight',
      name: 'eight',
      component: eight
    },
    {
      path: '/nine',
      name: 'nine',
      component: nine
    },
    {
      path: '/setpaynum',
      name: 'setpaynum',
      component: setpaynum
    },
    {
      path: '/resetpaynum',
      name: 'resetpaynum',
      component: resetpaynum
    },
    {
      path: '/agreement',
      name: 'agreement',
      component: agreement
    },
    {
      path: '/temporaryLimit',
      name: 'temporaryLimit',
      component: temporaryLimit
    },
    {
      path: '/PromoteLimit',
      name: 'PromoteLimit',
      component: PromoteLimit
    },
    {
      path: '/CommonProblem',
      name: 'CommonProblem',
      component: CommonProblem
    },
    {
      path: '/pay',
      name: 'pay',
      component: pay
    },
    {
      path: '/jumpBankCard',
      name: 'jumpBankCard',
      component: jumpBankCard
    },
    {
      path: '/myCenter',
      name: 'myCenter',
      component: myCenter
    },
    {
      path: '/MyBill',
      name: 'MyBill',
      component: MyBill
    },
    {
      path: '/modificationAddress',
      name: 'modificationAddress',
      component: modificationAddress
    },

  ]
})




//
// router.beforeEach((to,from,next) => {
//   if(to.matched.some( m => m.meta.auth)){
// // 对路由进行验证
//     if(store.state.isLogin=='100') { // 已经登陆
//       next()     // 正常跳转到你设置好的页面
//     }else{
// // 未登录则跳转到登陆界面，query:{ Rurl: to.fullPath}表示把当前路由信息传递过去方便登录后跳转回来；
//       next({path:'/nine',query:{ Rurl: to.fullPath} })
//     }
//   }else{
//     next()
//   }
// })

export default router;
